package unit11.extractSubclass;

/**
 * @author v_irlwang
 * @date 2021/5/24
 */
public class JobItem {
    private int unitPrice;
    private int quantity;

    protected JobItem(int unitPrice, int quantity) {
        this.unitPrice = unitPrice;
        this.quantity = quantity;
    }

    public int getTotalPrice() {
        return getUnitPrice() * getUnitPrice();
    }

    public int getUnitPrice() {
        return unitPrice;
    }

    public int getQuantity() {
        return quantity;
    }

    protected boolean isLabor(){
        return false;
    }

}
